package org.aplikator.server.descriptor;

import org.aplikator.client.shared.descriptor.DateFieldDTO;
import org.aplikator.client.shared.descriptor.WidgetDTO;
import org.aplikator.server.Context;

import java.util.Date;

public class DateField extends WidgetPropertyDescriptorBase<Date> {



    public DateField(Property<Date> property) {
        super(property);
    }

    @Override
    public WidgetDTO getWidgetDescriptor(Context ctx) {
        DateFieldDTO desc = new DateFieldDTO(getProperty().clientClone(ctx));
        desc.setSize(getSize());
        desc.setFormatPattern(getFormatPattern());
        desc.setEnabled(isEnabled());
        return desc;
    }


}
